//
//  OptionalCollectionViewCell.m
//  Project two framework
//
//  Created by rimi on 16/7/25.
//  Copyright © 2016年 张峥. All rights reserved.
//

#import "OptionalCollectionViewCell.h"

@interface OptionalCollectionViewCell ()
@property(nonatomic,strong)UIImageView *imageview;


@end

@implementation OptionalCollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        [self initialzDataSource];
    }
    return self;

}

-(void)initialzDataSource{
    _imageview = [[UIImageView alloc]initWithFrame:self.bounds];
//    _imageview.backgroundColor = [UIColor redColor];
    _imageview.userInteractionEnabled = YES;
    _imageview.image = [UIImage imageNamed:@"未标题-1_01.png"];
    [self.contentView addSubview:_imageview];
    
    _headLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.bounds.size.width / 2 - 50, 15, 100, 20)];
    _headLabel.text = @"测试";
    _headLabel.textAlignment = NSTextAlignmentCenter;
    _headLabel.font = [UIFont boldSystemFontOfSize:16];
    _headLabel.textColor = [UIColor blackColor];
    [_imageview addSubview:_headLabel];
    

    _contentLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.bounds.size.width / 2 - 50, 120, 100, 15)];
    _contentLabel.text = @"测试";
    _contentLabel.textAlignment = NSTextAlignmentCenter;
    _contentLabel.font = [UIFont systemFontOfSize:14];
    _contentLabel.textColor = [UIColor blackColor];
    [_imageview addSubview:_contentLabel];
    
    _detailsBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    _detailsBtn.frame = CGRectMake(70, 195, 60, 30);
    [_detailsBtn setImage:[UIImage imageNamed:@"详情_01"] forState:UIControlStateNormal];
    [_imageview addSubview:_detailsBtn];
    
    _chooseBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    _chooseBtn.frame = CGRectMake(145, 195, 60, 30);
    [_chooseBtn setImage:[UIImage imageNamed:@"选购_03"] forState:UIControlStateNormal];
    [_imageview addSubview:_chooseBtn];

}

























@end
